<?php
// safety checks
	if(defined(ROOT_PATH)) die('No permission.');
	$act = (isset($_POST['act'])) ? $_POST['act'] : die('No permission.');
	$path = (isset($_POST['path'])) ? $_POST['path'] : die('No permission.');

// required
	require '../../../kernel/kernel.php';
	if(!isset($user) || !$user->isLoggedIn()) die('No permission.');

// init module
	include $modules->controller();
	include $modules->lang();
	$modules->init();

// action
	switch($act) {
		
		case 'openFolder':
			$module->printFilesFolders($path);
			echo '<script type="text/javascript"> initFF(); </script>';
			break;
		
		case 'showDetail':
			$module->getDetail($path);
			break;
		
		case 'addFile':
			echo 'addFile';
			break;
		
		case 'addFolder':
			echo 'addFolder';
			break;
		
		case 'editFile':
			echo 'editFile';
			break;
		
		case 'duplicateFile':
			echo 'duplicateFile';
			break;
		
		case 'deleteFile':
			echo 'deleteFile';
			break;
		
		case 'resizeFile':
			echo 'resizeFile';
			break;
		
		default:
			echo 'Error.';
			break;
		
	}

?>